<?php
/**
* Class untuk generate otomatis head meta standar Kemuning
*/

class Kemuning_View_Helper_Metagenerator extends Zend_Controller_Plugin_Abstract
{
    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
        $viewRender = Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer');
        
        $viewRender->initView();
        
        $view = $viewRender->view;
        
        $view->headTitle(Zend_Registry::get('config')->site->meta->title);
                        
        $view->headMeta()->appendName('author',
                                        Zend_Registry::get('config')->site->meta->author
                                      );
        $view->headMeta()->appendName('google-site-verification',
                                        Zend_Registry::get('config')->site->meta->googleid
                                      );
        $view->headMeta()->appendName('y_key',
                                        Zend_Registry::get('config')->site->meta->yahookey
                                      );
        $view->headMeta()->appendName('alexaVerifyID',
                                        Zend_Registry::get('config')->site->meta->alexaid
                                      );
        $view->headMeta()->appendName('generator',
                                        Kemuning_Version::getAppName() 
                                        . ' ' 
                                        . Kemuning_Version::getVersion()
                                      );
    }
}

?>